package com.example.pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class MoviePage extends InternalPage {

    @FindBy(xpath = "//a[contains(@href,'go=edit')]")
    private WebElement editLink;

    @FindBy(xpath = "//a[contains(@onclick,'go=delete')]")
    private WebElement removeLink;

    @FindBy(xpath = "//a[contains(@onclick,'seen')]")
    private WebElement seenLink;

    @FindBy(id = "movie")
    private WebElement movieContent;

    public MovieEditPage editMovie() {
        editLink.click();
        return MyPageFactory.getPage(driver, MovieEditPage.class);
    }

    public void removeMovie() {
        removeLink.click();
    }


}
